unit untConfBoleto;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, untAbsEdicao, Vcl.ImgList, Vcl.ActnList,
  Vcl.ComCtrls, Vcl.ToolWin, Vcl.ExtCtrls, Data.DB, Data.Win.ADODB,
  Vcl.StdCtrls, Vcl.Mask, Vcl.DBCtrls, FileCtrl, Vcl.Buttons;

type
  TfrmConfBoleto = class(TfrmAbsEdicao)
    qryConfBoleto: TADOQuery;
    dtsConfBoleto: TDataSource;
    qryConfBoletoPATH_REMESSA: TStringField;
    qryConfBoletoPATH_RETORNO: TStringField;
    qryConfBoletoPATH_LOGOTIPO: TStringField;
    qryConfBoletoPATH_GERARPDF: TStringField;
    qryConfBoletoMENSAGEM: TStringField;
    qryConfBoletoESPECIE: TStringField;
    qryConfBoletoMOEDA: TStringField;
    qryConfBoletoACEITE: TStringField;
    qryConfBoletoCARTEIRA: TStringField;
    qryConfBoletoLOCAL_PAGTO: TStringField;
    qryConfBoletoINSTRUCAO_1: TStringField;
    qryConfBoletoINSTRUCAO_2: TStringField;
    qryConfBoletoCONT_REMESSA: TIntegerField;
    Label1: TLabel;
    DBEdit1: TDBEdit;
    Label2: TLabel;
    DBEdit2: TDBEdit;
    Label3: TLabel;
    DBEdit3: TDBEdit;
    Label4: TLabel;
    DBEdit4: TDBEdit;
    Label5: TLabel;
    Label6: TLabel;
    DBEdit6: TDBEdit;
    Label7: TLabel;
    DBEdit7: TDBEdit;
    Label8: TLabel;
    DBEdit8: TDBEdit;
    Label9: TLabel;
    DBEdit9: TDBEdit;
    Label10: TLabel;
    DBEdit10: TDBEdit;
    Label11: TLabel;
    DBEdit11: TDBEdit;
    Label12: TLabel;
    DBEdit12: TDBEdit;
    btnRemessa: TSpeedButton;
    btnRetorno: TSpeedButton;
    btnLogoTipo: TSpeedButton;
    btnGeraPDF: TSpeedButton;
    qryConfBoletoID: TIntegerField;
    DBRichEdit1: TDBRichEdit;
    procedure btnRemessaClick(Sender: TObject);
    procedure btnRetornoClick(Sender: TObject);
    procedure btnLogoTipoClick(Sender: TObject);
    procedure btnGeraPDFClick(Sender: TObject);
    procedure dtsConfBoletoStateChange(Sender: TObject);
  private
    { Private declarations }
  protected
    procedure CaixaAlta; override;
  public
    { Public declarations }
  end;

var
  frmConfBoleto: TfrmConfBoleto;

const
SELDIRHELP = 1000;

implementation

{$R *.dfm}

uses untDTMPrincipal;

procedure TfrmConfBoleto.btnGeraPDFClick(Sender: TObject);
var
  Dir: string;
begin
  if SelectDirectory(Dir, [sdAllowCreate, sdPerformCreate, sdPrompt],SELDIRHELP) then
    qryConfBoletoPATH_GERARPDF.AsString := Dir;
end;

procedure TfrmConfBoleto.btnLogoTipoClick(Sender: TObject);
var
  Dir: string;
begin
  if SelectDirectory(Dir, [sdAllowCreate, sdPerformCreate, sdPrompt],SELDIRHELP) then
    qryConfBoletoPATH_LOGOTIPO.AsString := Dir;
end;

procedure TfrmConfBoleto.btnRemessaClick(Sender: TObject);
var
  Dir: string;
begin
  if SelectDirectory(Dir, [sdAllowCreate, sdPerformCreate, sdPrompt],SELDIRHELP) then
    qryConfBoletoPATH_REMESSA.AsString := Dir;
end;

procedure TfrmConfBoleto.btnRetornoClick(Sender: TObject);
var
  Dir: string;
begin
  if SelectDirectory(Dir, [sdAllowCreate, sdPerformCreate, sdPrompt],SELDIRHELP) then
    qryConfBoletoPATH_RETORNO.AsString := Dir;
end;

procedure TfrmConfBoleto.CaixaAlta;
begin
//  inherited;
end;

procedure TfrmConfBoleto.dtsConfBoletoStateChange(Sender: TObject);
begin
  inherited;
  AtualizarBotoes;
end;

end.
